<template>
  <div>
    <h2>Home: {{ $store.state.counter }}</h2>
    <h2>Home: {{ sCounter }}</h2>
    <h2>Home: {{ sName }}</h2>
    <h2>Home: {{ age }}</h2>
  </div>
</template>

<script>
import { mapState } from "vuex";

export default {
  computed: {
    sCounter() {
      return this.$store.state.counter;
    },
    // ...mapState(["counter", "name", "age"]),
    ...mapState({
      sName: (state) => state.name,
    }),
  },
};
</script>

<style scoped></style>
